<template>
  <div class="app">
      <h1>我是根组件App</h1>
      <Child/>
      <Child1/>
  </div>
</template>

<script>
import Child from './components/Child'
import Child1 from './components/Child1';
export default {
  name: '',
  components:{
    Child,
    Child1
  },
  //父组件App
  mounted(){
    //app组件（爷爷）,找到原型的原型的$bus
    this.$bus.$on('send',(params)=>{
        console.log(params);
    })
  }
}
</script>

<style>
*{
  margin:0;
  padding: 0;
}
html,body{
  width: 100%;
  height: 100%;
  background: pink;
}
.app{
  width: 100%;
  height: 100%;
}
</style>
